[{include file="Msg/header" /}]  <!--包含头部文件-->
<form id="tongzhiform" action="[{$Think.const.APP_ADMIN_URL}]Msg/tongzhi" method="post" class="definewidth m20">
    <!--隐藏要发送的管理员id-->
    <input type="hidden" name="am_id" value="[{$Think.Session.am_id}]"/>
    <table class="table table-bordered table-hover definewidth m10">
        <tr>
            <td width="10%" class="tableleft">选择被通知用户</td>
            <td>
                <select name="user_id">
                    <!--循环出栏目名-->
                    [{foreach userlist as $k=>$v }]
                    <option value="[{$v.user_id}]">[{$v.username}]</option>
                    [{/foreach}]
                </select>
            </td>
        </tr>
        <tr>
            <td width="10%" class="tableleft">通知内容</td>
            <td><textarea name="tz_content" id="tz_content" cols="30" rows="10"></textarea></td>
        </tr>
        <tr>
            <td class="tableleft"></td>
            <td>
                <button id="fasongid" type="submit" class="btn btn-primary" type="button">发送</button>
                &nbsp;&nbsp;
                <a href="[{$Think.const.APP_ADMIN_URL}]Msg/tongzhilistdel" class="btn btn-success">返回列表</a>
            </td>
        </tr>
    </table>
</form>
<!--一个简单的jq，不能让通知内容为空-->
<script type="text/javascript">
    $(document).ready(function(){
        $('#fasongid').click(function(){
            var tz = $('#tz_content').val();
            if(tz == ''){
                alert('通知内容不能为空');
                return false;
            }
            $('#tongzhiform').submit();
        });
    });
</script>